{% extends "base.html" %}

{% block title %}Cryptocurrencies{% endblock %}

{% block content %}
    <article id="main" class="markdown-section">
	<h1>Group profiles</h1>
        {% for entry in data %}
            <h3 id="{{entry.title}}"> {{ entry.title() }}<h3>
            <h4>Wallets</h4>
            <div class="table-responsive">
            <table id="table" class="table" style="display:table; table-layout:auto; width:100%">
            <thead>
                <tr>
                    <th style="width:25%"> Type </th>
                    <th style="width:75%"> Value </th>
                </tr>
            </thead>
            <tbody>
            {% for crypto in data[entry] %}
                <tr>
                <td> {{ crypto['blockchain'] }}  </td>
                <td> {{ crypto['address'] }}</td>
                </tr>
                {% if crypto['transactions']|length > 0 %}
                <tr>
                <td></td>
                <td><table id="table" class="table" style="display:table; table-layout:auto; width:100%">
                <thead>
                   <tr>
                       <th style="width:65%"> Transaction </th>
                       <th style="width:25%"> Amount </th>
                       <th style="width:10%"> Value ($) </th>
                   </tr>
               </thead>

                {% for transactions in crypto['transactions'] %}
                    <tr><td>{{ transactions['hash'] }}</td>
                    <td>{{ transactions['amount'] * 0.00000001}}</td>
                    <td>{{ transactions['amountUSD' ]|round(2, 'ceil') }}</td></tr>
                {% endfor %}
                </table></td>
                </tr>
                {% endif %}

            {% endfor %}
           </tbody>
           </table>
           </div>
        {% endfor %}
    </article>
{% endblock %}
